package com.photoeditor.demo.model.bean.face;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author lyzirving
 * time        2018/11/8
 * email       lyzirving@sina.com
 * information
 */
public class BaseFaceScanBean implements Parcelable {

    private boolean isSecondRequest;//标识，是否为二次请求

    private String key;//标识，如果检测的是融合的2张照片，2个bean中的key都是相同的

    private int code;//返回码，标识是否成功

    public static final Creator<BaseFaceScanBean> CREATOR = new Creator<BaseFaceScanBean>() {
        @Override
        public BaseFaceScanBean createFromParcel(Parcel in) {
            return new BaseFaceScanBean(in);
        }

        @Override
        public BaseFaceScanBean[] newArray(int size) {
            return new BaseFaceScanBean[size];
        }
    };

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public boolean isSecondRequest() {
        return isSecondRequest;
    }

    public void setIsSecondRequest(boolean secondRequest) {
        isSecondRequest = secondRequest;
    }

    public BaseFaceScanBean() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.key);
        dest.writeInt(this.code);
    }

    protected BaseFaceScanBean(Parcel in) {
        this.key = in.readString();
        this.code = in.readInt();
    }

}
